<template>
    <view>
        <cu-custom bgColor="bg-white" :isBack="true" :home="true"><block slot="content" class="text-000 text-black">视频和剧照</block></cu-custom>
        <view class="padding bg-white">
            <view class="flex justify-start flex-wrap">
                <img :src="$tools.mThumb(movieInfo.imgurl+item,250)" mode="aspectFill" style="width:31%;height:220rpx;" class="radius margin-right-xs margin-bottom-xs" @tap="previewImage(movieInfo.imgurl+item)" v-for="(item,index) in movieImgs" :key="index"/>
            </view>
        </view>
    </view>
</template>

<script>
    export default {
        name: "",
        data() {
            return {
                movieInfo:'',
                movieImgs:'',
            }
        },
        components: {},
        computed: {},
        created() {

        },
        onLoad(options) {
            this.options = options;
            this.fetchData()
        },
        methods: {
            previewImage(item){
                uni.previewImage({current:item, urls:[item]})
            },
            async fetchData(){
                //幻灯片
                let res        = await this.$api.movieInfo({...this.options,'city_name':'南京'})
                this.movieInfo = res.data.detail
                this.movieImgs = res.data.detail.trailer_list
            },
        }
    }
</script>

<style scoped>
</style>